package com.kedi.evergreenschoolcenter.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;







import com.kedi.evergreenschoolcenter.service.CommunitysalonService;
import com.kedi.evergreenschoolcenter.service.CourseRegService;
import com.kedi.evergreenschoolcenter.service.OnlineclassService;
import com.kedi.evergreenschoolcenter.service.TeachersignService;

import java.util.List;
import java.util.Map;

/**
 * 
* @Description: 常青学苑控制层
* @author: clx
* @date: 2019 2019年7月8日 下午2:00:59
 */
@RestController
public class EvergreenSchoolCenterController {
    
    @Autowired
    CommunitysalonService communitysalonService;
    @Autowired
    CourseRegService courseRegClassService;
    @Autowired
    OnlineclassService onlineclassService;
    @Autowired
    TeachersignService teachersignService;
    @RequestMapping("/selectcommunitysalon")
    public List<Map<String, Object>> selectcommunitysalon() {
    	return communitysalonService.communitysalon();
    }
    
    @RequestMapping("/getcommunitysalonphone")
    public int getcommunitysalonphone(@RequestParam int id) {
    	return communitysalonService.getcommunitysalonphone(id);
    }
    
    @RequestMapping("/getsfid")
    public int getsfid(@RequestParam int page,int limit) {
    	return onlineclassService.getsfid(page,limit);
    }
    
    @RequestMapping("/getsfphone")
    public int getsfphone(@RequestParam int id) {
    	return onlineclassService.getsfphone(id);
    }
    
    @RequestMapping("/getwdid")
    public int getwdid(@RequestParam int page,int limit) {
    	return onlineclassService.getwdid(page,limit);
    }
    
    @RequestMapping("/getwdphone")
    public int getwdphone(@RequestParam int id) {
    	return onlineclassService.getwdphone(id);
    }
    
    @RequestMapping("/getsgyid")
    public int getsgyid(@RequestParam int page,int limit) {
    	return onlineclassService.getsgyid(page,limit);
    }
    
    @RequestMapping("/getsgyphone")
    public int getsgyphone(@RequestParam int id) {
    	return onlineclassService.getsgyphone(id);
    }
    
    @RequestMapping("/getsmyyid")
    public int getsmyyid(@RequestParam int page,int limit) {
    	return onlineclassService.getsmyyid(page,limit);
    }
    
    @RequestMapping("/getsmyyphone")
    public int getsmyyphone(@RequestParam int id) {
    	return onlineclassService.getsmyyphone(id);
    }
    
    @RequestMapping("/getcoursereg")
    public List<Map<String, Object>> selectcoursereg() {
    	return courseRegClassService.coursereg();
    }
    
    @RequestMapping("/getcourseregphone")
    public int getcourseregphone(@RequestParam int id) {
    	return courseRegClassService.getcourseregphone(id);
    }
    
    @RequestMapping("/selectcalss")
    public List<Map<String, Object>> selectcalss() {
    	return onlineclassService.calss();
    }
    
    @RequestMapping("/selectonline")
    public List<Map<String, Object>> selectonline(@RequestParam String title) {
    	return onlineclassService.online(title);
    }
    
    @RequestMapping("/gettteachersignphone")
    public int gettteachersignphone(@RequestParam int id) {
    	return teachersignService.gettteachersignphone(id);
    }
   
}
